<!doctype html>
<html lang="en">
<head>
    <title>Code coverage report for src/JSAPI/API/index.js</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="..\..\..\prettify.css" />
    <link rel="stylesheet" href="..\..\..\base.css" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style type='text/css'>
        .coverage-summary .sorter {
            background-image: url(..\..\..\sort-arrow-sprite.png);
        }
    </style>
</head>
<body>
<div class='wrapper'>
  <div class='pad1'>
    <h1>
      <a href="..\..\..\index.html">All files</a> / <a href="index.html">src/JSAPI/API</a> index.js
    </h1>
    <div class='clearfix'>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Statements</span>
        <span class='fraction'>0/37</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Branches</span>
        <span class='fraction'>0/32</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Functions</span>
        <span class='fraction'>0/3</span>
      </div>
      <div class='fl pad1y space-right2'>
        <span class="strong">0% </span>
        <span class="quiet">Lines</span>
        <span class='fraction'>0/32</span>
      </div>
    </div>
  </div>
  <div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74</td><td class="line-coverage quiet"><span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">let u = navig<span class="cstat-no" title="statement not covered" >ator.userAgent<span class="cstat-no" title="statement not covered" ><span class="cstat-no" title="statement not covered" ><span class="cstat-no" title="statement not covered" ><span class="cstat-no" title="statement not covered" ><span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" ></span></span></span></span></span></span></span>
/***
 * 浏览器标识
 * @type {{versions: {trident, presto, webKit, gecko, mobile, ios, android, iPhone, iPad, webApp}, language: string}}
 */
let browser = <span class="cstat-no" title="statement not covered" >{</span>
    versions: <span class="fstat-no" title="function not covered" >(f</span>unction() {
<span class="cstat-no" title="statement not covered" >        return { // 移动终端浏览器版本信息</span>
            trident: u.indexOf('Trident') &gt; -1, // IE内核
            presto: u.indexOf('Presto') &gt; -1, // opera内核
            webKit: u.indexOf('AppleWebKit') &gt; -1, // 苹果、谷歌内核
            gecko: u.indexOf('Gecko') &gt; -1 &amp;&amp; u.indexOf('KHTML') === -1, // 火狐内核
            mobile: !!u.match(/AppleWebKit.*Mobile.*/), // 是否为移动终端
            ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), // ios终端
            android: u.indexOf('Android') &gt; -1 || u.indexOf('Linux') &gt; -1, // android终端或者uc浏览器
            iPhone: u.indexOf('iPhone') &gt; -1, // 是否为iPhone或者QQHD浏览器
            iPad: u.indexOf('iPad') &gt; -1, // 是否iPad
            webApp: u.indexOf('Safari') === -1 // 是否web应该程序，没有头部与底部
        }
    })(),
    language: (navigator.browserLanguage || navigator.language).toLowerCase()
}
/***
 * 打印对象
 * @param o
 * @returns {*}
 */
let printObject = <span class="cstat-no" title="statement not covered" >function(<span class="fstat-no" title="function not covered" >o) {</span></span>
    let r = <span class="cstat-no" title="statement not covered" >[]</span>
<span class="cstat-no" title="statement not covered" >    if (typeof o === 'string') {</span>
<span class="cstat-no" title="statement not covered" >        return '\'' + o.replace(/([\\])/g, '\\$1').replace(/(\n)/g, '\\n').replace(/(\r)/g, '\\r').replace(/(\t)/g, '\\t') + '\''</span>
    }
<span class="cstat-no" title="statement not covered" >    if (typeof o === 'object') {</span>
<span class="cstat-no" title="statement not covered" >        if (!o.sort) {</span>
<span class="cstat-no" title="statement not covered" >            for (let i in o) {</span>
<span class="cstat-no" title="statement not covered" >                r.push('\'' + i + '\'' + ':' + printObject(o[i]))</span>
            }
<span class="cstat-no" title="statement not covered" >            if (!!document.all &amp;&amp; !/^\n?function\s*toString\(\)\s*\{\n?\s*\[native code\]\n?\s*\}\n?\s*$/.test(o.toString)) {</span>
<span class="cstat-no" title="statement not covered" >                r.push('toString:' + o.toString.toString())</span>
            }
<span class="cstat-no" title="statement not covered" >            r = '{' + r.join() + '}'</span>
        } else {
<span class="cstat-no" title="statement not covered" >            for (let i = 0; i &lt; o.length; i++) {</span>
<span class="cstat-no" title="statement not covered" >                r.push(printObject(o[i]))</span>
            }
<span class="cstat-no" title="statement not covered" >            r = '[' + r.join() + ']'</span>
        }
<span class="cstat-no" title="statement not covered" >        return r</span>
    }
<span class="cstat-no" title="statement not covered" >    if (typeof o === 'object') {</span>
<span class="cstat-no" title="statement not covered" >        if (!o.sort) {</span>
<span class="cstat-no" title="statement not covered" >            for (let i in o) {</span>
<span class="cstat-no" title="statement not covered" >                r.push('\'' + i + '\'' + ':' + printObject(o[i]))</span>
            }
<span class="cstat-no" title="statement not covered" >            if (!!document.all &amp;&amp; !/^\n?function\s*toString\(\)\s*\{\n?\s*\[native code\]\n?\s*\}\n?\s*$/.test(o.toString)) {</span>
<span class="cstat-no" title="statement not covered" >                r.push('toString:' + o.toString.toString())</span>
            }
<span class="cstat-no" title="statement not covered" >            r = '{' + r.join() + '}'</span>
        } else {
<span class="cstat-no" title="statement not covered" >            for (let i = 0; i &lt; o.length; i++) {</span>
<span class="cstat-no" title="statement not covered" >                r.push(printObject(o[i]))</span>
            }
<span class="cstat-no" title="statement not covered" >            r = '[' + r.join() + ']'</span>
        }
<span class="cstat-no" title="statement not covered" >        return r</span>
    }
<span class="cstat-no" title="statement not covered" >    return o.toString()</span>
}<span class="cstat-no" title="statement not covered" ></span>
&nbsp;
export {
    browser,<span class="cstat-no" title="statement not covered" ></span>
    printObject
}
&nbsp;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
  Code coverage
  generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Wed Feb 07 2018 16:13:19 GMT+0800 (中国标准时间)
</div>
</div>
<script src="..\..\..\prettify.js"></script>
<script>
window.onload = function () {
        if (typeof prettyPrint === 'function') {
            prettyPrint();
        }
};
</script>
<script src="..\..\..\sorter.js"></script>
</body>
</html>
